Skip to content

Arches' displayname Searching#1165

Closed
braydencstratusadv wants to merge 1 commit intomainfrom
blc/bugfix/arches_search
Closed

Arches' displayname Searching#1165
braydencstratusadv wants to merge 1 commit intomainfrom
blc/bugfix/arches_search

Conversation

@braydencstratusadv
Copy link
Collaborator

@braydencstratusadv braydencstratusadv commented Jan 8, 2026

Here is the diff between stable/8.0.6_bcgov_12377 in Arches and what I have added to (and monkey-patched in) BCAP. I have NOT included the monkey-patch (which involves updating bcap/apps.py):
https://www.diffchecker.com/M3qtUzkT/

Here is apps.py, if you want to test it out:

from django.apps import AppConfig


class BcapConfig(AppConfig):
    name = "bcap"
    is_arches_application = True

    def ready(self):
        from arches.app.search.components import term_filter
        from bcap.search_components.term_filter import TermFilter
        term_filter.TermFilter = TermFilter

I used: git log -p --all -S "displayname.value" -- "**/*.py" to search through the Arches repository. I found that there existed:

boolquery.should(
    Match(field="displayname.value", query=searchString, fuzziness=2, boost=2)
)

on August 13, 2024 which added displayname search in commit f7f3525. On May 29, 2025, it was removed during a refactor in commit b15a6d5. The line was deleted when the code was reorganized.

However, this was for the search dropdown autocomplete, not the actual term filter that executes the "Contains Term" search. Our fix adds displayname search to the term filter in bcap/search_components/term_filter.py.

@bferguso
Copy link
Collaborator

HER England has something similar happening, which appears to be caused by a search term being in two places. I'm going to contact them to see what they're experiencing to see if it's what's going on here, and to find out if they've already resolved this or not.

@braydencstratusadv braydencstratusadv marked this pull request as draft January 26, 2026 15:58
@bferguso
Copy link
Collaborator

I think we'd be better off to use the EsMappingModifier functionality for this so we don't have to override the search_term.py. I'm going to submit a separate PR for this after I'm done testing it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants